package com.jgp.common.utils;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * 项目   jgp-cloud-parent
 * 作者   loufei
 * 时间   2019-11-04
 */
public class InsertUpdateDelete<T> {
    private List<T> inserts;
    private List<T> updates;
    private List<T> deletes;
    
    public InsertUpdateDelete() {
        this.inserts = new ArrayList<>();
        this.updates = new ArrayList<>();
        this.deletes = new ArrayList<>();
    }
    
    public InsertUpdateDelete(List<T> inserts, List<T> updates, List<T> deletes) {
        this.inserts = Objects.nonNull(inserts)?inserts:new ArrayList<>();
        this.updates = Objects.nonNull(updates)?updates:new ArrayList<>();
        this.deletes = Objects.nonNull(deletes)?deletes:new ArrayList<>();
    }
    
    public List<T> getInserts() {
        return inserts;
    }
    
    public void setInserts(List<T> inserts) {
        this.inserts = inserts;
    }
    
    public List<T> getUpdates() {
        return updates;
    }
    
    public void setUpdates(List<T> updates) {
        this.updates = updates;
    }
    
    public List<T> getDeletes() {
        return deletes;
    }
    
    public void setDeletes(List<T> deletes) {
        this.deletes = deletes;
    }
}
